
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>百度图表 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="WINDOW.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="BUTTON.html">
            
                <a href="BUTTON.html">
            
                    
                    按钮
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="PAGE.html">
            
                <a href="PAGE.html">
            
                    
                    分页
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="DROP.html">
            
                <a href="DROP.html">
            
                    
                    下拉按钮
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="CHECKBOX.html">
            
                <a href="CHECKBOX.html">
            
                    
                    单选与多选
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="TOAST.html">
            
                <a href="TOAST.html">
            
                    
                    消息提示
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="CONFIRM.html">
            
                <a href="CONFIRM.html">
            
                    
                    确认对话框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="MODAL.html">
            
                <a href="MODAL.html">
            
                    
                    模态框
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="WINDOW.html">
            
                <a href="WINDOW.html">
            
                    
                    窗口
            
                </a>
            

            
        </li>
    

    
        
        <li class="divider"></li>
        
        
    
        <li class="chapter active" data-level="5.1" data-path="ECHARTS.html">
            
                <a href="ECHARTS.html">
            
                    
                    百度图表
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >百度图表</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x767E;&#x5EA6;&#x56FE;&#x8868;">&#x767E;&#x5EA6;&#x56FE;&#x8868;</h1>
<p>&#x8BE6;&#x7EC6;&#x4F7F;&#x7528;&#x8BF7;&#x53C2;&#x8003;&#x767E;&#x5EA6;&#x56FE;&#x8868;<a href="http://echarts.baidu.com/api.html#echarts" target="_blank">&#x5B98;&#x65B9;&#x6587;&#x6863;</a>&#x3002;</p>
<h2 id="&#x5BFC;&#x5165;&#x76F8;&#x5173;&#x6A21;&#x5757;">&#x5BFC;&#x5165;&#x76F8;&#x5173;&#x6A21;&#x5757;</h2>
<p>&#x9700;&#x8981;&#x5728;&#x6839;&#x6A21;&#x5757;&#x5BFC;&#x5165;&#x6A21;&#x5757;EChartModule&#xFF08;<strong>&#x5728;&#x5176;&#x5B83;&#x4EFB;&#x4F55;&#x6A21;&#x5757;&#x4E2D;&#x4E0D;&#x9700;&#x8981;&#x5BFC;&#x5165;&#x4E86;&#xFF01;</strong>&#xFF09;</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { NgModule } from <span class="hljs-string">&apos;@angular/core&apos;</span>;
<span class="hljs-keyword">import</span> { AppRoutingModule } from <span class="hljs-string">&apos;./app.routing&apos;</span>;
<span class="hljs-keyword">import</span> { AppComponent } from <span class="hljs-string">&apos;./app.component&apos;</span>;

<span class="hljs-comment">// &#x9700;&#x8981;&#x4F7F;&#x7528;EChartModule&#x6A21;&#x5757;</span>
<span class="hljs-keyword">import</span> {EChartModule} from <span class="hljs-string">&apos;ng-tools-ui&apos;</span>;

@NgModule({
    declarations: [AppComponent],
    imports: [
        ...
        <span class="hljs-comment">// &#x9700;&#x8981;&#x63D0;&#x4F9B;&#x76F8;&#x5173;js&#x7684;&#x52A0;&#x8F7D;&#x8DEF;&#x5F84;</span>
        EChartModule.forRoot(<span class="hljs-string">&apos;assets/echart/echarts.common.min.js&apos;</span>),
        ...
        AppRoutingModule,
    ],
    bootstrap: [AppComponent]
})
<span class="hljs-keyword">export</span> <span class="hljs-keyword">class</span> AppModule { }
</code></pre>
<h2 id="&#x4F7F;&#x7528;&#x6307;&#x4EE4;baseechart&#x8BA9;&#x4E00;&#x4E2A;div&#x53D8;&#x6210;&#x767E;&#x5EA6;&#x56FE;&#x8868;&#x7684;&#x5BB9;&#x5668;">&#x4F7F;&#x7528;&#x6307;&#x4EE4;<code>baseEchart</code>&#x8BA9;&#x4E00;&#x4E2A;div&#x53D8;&#x6210;&#x767E;&#x5EA6;&#x56FE;&#x8868;&#x7684;&#x5BB9;&#x5668;</h2>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">baseEchart</span> 
    [<span class="hljs-attr">option</span>]=<span class="hljs-string">&quot;options&quot;</span>
    <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;width:100%;height:400px;&quot;</span>&gt;</span>    <span class="hljs-comment">&lt;!-- &#x9700;&#x8981;&#x7ED9;div&#x9AD8;&#x5BBD;&#xFF0C;&#x4E0D;&#x7136;&#x770B;&#x4E0D;&#x89C1;&#x56FE;&#x8868; --&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p><img src="images/echart.png" alt="&#x56FE;&#x8868;&#x5B9E;&#x4F8B;"></p>
<p>@Input</p>
<table>
<thead>
<tr>
<th>&#x540D;&#x79F0;</th>
<th>&#x7C7B;&#x578B;</th>
<th>&#x8BE6;&#x60C5;</th>
</tr>
</thead>
<tbody>
<tr>
<td>option</td>
<td>any</td>
<td>&#x56FE;&#x8868;&#x53C2;&#x6570;&#xFF0C;&#x540C;&#x767E;&#x5EA6;&#x56FE;&#x8868;&#x5B98;&#x65B9;&#x793A;&#x4F8B;&#x4E2D;&#x7684;option,&#x89C1;&#x4E0A;&#x56FE;</td>
</tr>
<tr>
<td>resize</td>
<td>boolean</td>
<td>&#x662F;&#x5426;&#x542F;&#x7528;&#x81EA;&#x9002;&#x5E94;&#x5BBD;&#x5EA6;</td>
</tr>
</tbody>
</table>
<p>@Output</p>
<table>
<thead>
<tr>
<th>&#x4E8B;&#x4EF6;&#x540D;&#x79F0;</th>
<th>&#x4E8B;&#x4EF6;&#x7C7B;&#x578B;</th>
<th>&#x8BE6;&#x60C5;</th>
</tr>
</thead>
<tbody>
<tr>
<td>chartLoad</td>
<td>{ echartsInstance: EchartsInstance, echarts: any }</td>
<td>&#x56FE;&#x8868;&#x52A0;&#x8F7D;&#x6210;&#x529F;&#x540E;&#x4F1A;&#x63D0;&#x4F9B;&#x56FE;&#x8868;&#x7684;&#x5B9E;&#x4F8B;&#x548C;echarts&#x5BF9;&#x8C61;</td>
</tr>
</tbody>
</table>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="WINDOW.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 窗口">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"百度图表","level":"5.1","depth":1,"previous":{"title":"窗口","level":"4.4","depth":1,"path":"WINDOW.md","ref":"WINDOW.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"ECHARTS.md","mtime":"2018-09-27T06:24:16.590Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-12-08T02:14:36.809Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

